home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness:…ecision-Making Strategies / Workplace Effectiveness: Decision-Making Strategies.iso / pc / Files / Whowhat.dxr / 00008_PRINT & Write text file.ls < prev    next >
Encoding:
Text File  |  1998-12-16  |  2.0 KB  |  56 lines

  1. global gMasterData, gSpLocList, gSpNameList
  2.  
  3. on printButton
  4.   if iAmActivated(gMasterData) then
  5.     getPrintData()
  6.     set vThisField to string(getUserArea(gMasterData)) && "field"
  7.     print(the text of member vThisField)
  8.   else
  9.     alert("Printing is unavailable until an activity is completed.")
  10.   end if
  11. end
  12.  
  13. on getPrintData
  14.   set vThisField to string(getUserArea(gMasterData)) && "field"
  15.   set the text of member vThisField to EMPTY
  16.   set vTempText to EMPTY
  17.   put "---- Who, What, Where? (Problem Matrix) ----------" & RETURN & RETURN after vTempText
  18.   put getBigString() & RETURN & RETURN after vTempText
  19.   put RETURN after vTempText
  20.   set the text of member vThisField to vTempText
  21. end
  22.  
  23. on getBigString
  24.   set vText to EMPTY
  25.   put the text of member "print1" & RETURN after vText
  26.   set vJill to EMPTY
  27.   set vAlice to EMPTY
  28.   set vJack to EMPTY
  29.   set vBob to EMPTY
  30.   set vYou to EMPTY
  31.   storeSpLocs()
  32.   set theTotal to count(gSpLocList)
  33.   repeat with i = 1 to theTotal
  34.     set thePoint to getAt(gSpLocList, i)
  35.     set theName to getAt(gSpNameList, i)
  36.     set X to -24
  37.     repeat with j = 1 to 10
  38.       set X to X + 24
  39.       case 1 of
  40.         inside(thePoint, rect(280, 156 + X, 350, 181 + X)):
  41.           put line j of field "print2" && theName & RETURN after vJill
  42.         inside(thePoint, rect(350, 156 + X, 420, 181 + X)):
  43.           put line j of field "print2" && theName & RETURN after vAlice
  44.         inside(thePoint, rect(420, 156 + X, 490, 181 + X)):
  45.           put line j of field "print2" && theName & RETURN after vJack
  46.         inside(thePoint, rect(490, 156 + X, 560, 181 + X)):
  47.           put line j of field "print2" && theName & RETURN after vBob
  48.         inside(thePoint, rect(560, 156 + X, 630, 181 + X)):
  49.           put line j of field "print2" && theName & RETURN after vYou
  50.       end case
  51.     end repeat
  52.   end repeat
  53.   put "Jill" & RETURN & vJill & RETURN & "Alice" & RETURN & vAlice & RETURN & "Jack" & RETURN & vJack & RETURN & "Bob" & RETURN & vBob & RETURN & "You" & RETURN & vYou after vText
  54.   return vText
  55. end
  56.